from day01.basecla import BaseClass
from day01.basecla import driver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from time import sleep
c=BaseClass()
c.open_browser('file:///E:/%E8%93%AC%E8%8E%B1%E5%B0%8F%E8%AF%BE2024%E6%B5%8B%E8%AF%95/%E7%AC%AC%E5%9B%9B%E9%98%B6%E6%AE%B5/Selenium%E8%87%AA%E5%8A%A8%E5%8C%96/selenium_demo/day04demo/demo03.html')
myname=driver.find_element(By.CSS_SELECTOR,'#username')
myaccount=driver.find_element(By.CSS_SELECTOR,'#count')
mymesg=driver.find_element(By.CSS_SELECTOR,'#comments')
myname.send_keys('70s')
sleep(2)
myname.send_keys(Keys.BACK_SPACE)
sleep(2)
myaccount.send_keys(Keys.SHIFT,'aabbcc')
sleep(2)
myaccount.send_keys(Keys.CONTROL,'A')
myaccount.send_keys(Keys.CONTROL,'C')
sleep(2)
mymesg.send_keys(Keys.CONTROL,'v')
sleep(2)
myname.send_keys(Keys.CONTROL,'A')
myname.send_keys(Keys.CONTROL,'C')
sleep(2)
mymesg.send_keys(Keys.HOME)
mymesg.send_keys(Keys.ARROW_LEFT)
sleep(2)
mymesg.send_keys(Keys.CONTROL,'v')
sleep(2)
mymesg.send_keys(Keys.END)
sleep(2)
mymesg.send_keys(Keys.ENTER)
sleep(2)
mymesg.send_keys(Keys.CONTROL,'v')
sleep(2)
mymesg.send_keys(Keys.ARROW_LEFT)
sleep(2)
mymesg.send_keys(Keys.CONTROL,'v')





